<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>_longjmp</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_001_011">&nbsp;</a>NAME</h4><blockquote>
_longjmp, _setjmp  - non-local goto
</blockquote><h4><a name = "tag_000_001_012">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="setjmp.h.html">setjmp.h</a>&gt;

void _longjmp(jmp_buf <i>env</i>, int <i>val</i>);
int _setjmp(jmp_buf <i>env</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_000_001_013">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>_longjmp()</i>
and
<i><a href="_setjmp.html">_setjmp()</a></i>
functions are identical to
<i><a href="longjmp.html">longjmp()</a></i>
and
<i><a href="setjmp.html">setjmp()</a></i>,
respectively, with the additional restriction that
<i>_longjmp()</i>
and
<i><a href="_setjmp.html">_setjmp()</a></i>
do not manipulate the signal mask.
<p>
If
<i>_longjmp()</i>
is called even though
<i>env</i>
was never initialised by a call to
<i><a href="_setjmp.html">_setjmp()</a></i>,
or when the last such call was in a function that has since returned,
the results are undefined.
</blockquote><h4><a name = "tag_000_001_014">&nbsp;</a>RETURN VALUE</h4><blockquote>
Refer to
<i><a href="longjmp.html">longjmp()</a></i>
and
<i><a href="setjmp.html">setjmp()</a></i>.
</blockquote><h4><a name = "tag_000_001_015">&nbsp;</a>ERRORS</h4><blockquote>
No errors are defined.
</blockquote><h4><a name = "tag_000_001_016">&nbsp;</a>EXAMPLES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_001_017">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
If
<i>_longjmp()</i>
is executed and the environment in which
<i><a href="_setjmp.html">_setjmp()</a></i>
was executed no longer exists, errors can occur.
The conditions under which the environment of the
<i><a href="_setjmp.html">_setjmp()</a></i>
no longer exists include exiting the function that contains the
<i><a href="_setjmp.html">_setjmp()</a></i>
call, and exiting an inner block with temporary storage.
This condition might not be detectable, in which case the
<i>_longjmp()</i>
occurs and, if the environment no longer exists,
the contents of the temporary storage of an inner block are unpredictable.
This condition might also cause unexpected process termination.
If the function has returned, the results are undefined.
<p>
Passing
<i><a href="longjmp.html">longjmp()</a></i>
a pointer to a buffer not created by
<i><a href="setjmp.html">setjmp()</a></i>,
passing
<i>_longjmp()</i>
a pointer to a buffer not created by
<i><a href="_setjmp.html">_setjmp()</a></i>,
passing
<i><a href="siglongjmp.html">siglongjmp()</a></i>
a pointer to a buffer not created by
<i><a href="sigsetjmp.html">sigsetjmp()</a></i>
or passing any of these three functions a buffer that has been modified by the
user can cause all the problems listed above, and more.
<p>
The
<i>_longjmp()</i>
and
<i><a href="_setjmp.html">_setjmp()</a></i>
functions are included to support programs written to historical system
interfaces.  New applications should use
<i><a href="siglongjmp.html">siglongjmp()</a></i>
and
<i><a href="sigsetjmp.html">sigsetjmp()</a></i>
respectively.
</blockquote><h4><a name = "tag_000_001_018">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_001_019">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="longjmp.html">longjmp()</a></i>,
<i><a href="setjmp.html">setjmp()</a></i>,
<i><a href="siglongjmp.html">siglongjmp()</a></i>,
<i><a href="sigsetjmp.html">sigsetjmp()</a></i>,
<i><a href="setjmp.h.html">&lt;setjmp.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
